package cn.wolfcode.web.controller;

import cn.wolfcode.domain.LogInfo;
import cn.wolfcode.qo.LogInfoQuery;
import cn.wolfcode.qo.QueryObject;
import cn.wolfcode.service.ILogInfoService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/loginfo")
public class LogInfoController {
    @Autowired
    private ILogInfoService logInfoService;

    @RequestMapping("/list")
    public String list(Model model, LogInfoQuery qo){
        PageInfo<LogInfo> pageInfo = logInfoService.query(qo);
        model.addAttribute("pageInfo",pageInfo);
        model.addAttribute("qo",qo);
        return "/loginfo/list";
    }
}
